﻿using System.Collections.Generic;
using System.Linq;
using CVS.DAL;
using CVS.WebAPI.Models;

namespace CVS.WebAPI.Mappers
{
    public static class TestsMapper
    {
        public static List<TestDto> MapTests(List<TestDefinition> tests)
        {
            var testsDtos = tests.Select(t => new TestDto
            {
                Id = t.Id,
                ExpectedOutput = t.ExpectedOutput,
                Input = t.Input,
                TaskId = t.TaskId
            }).ToList();

            return testsDtos;
        }
    }
}